<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <table border="1">
        <tr>
            <th>id</th>
            <th>名称</th>
            <th>数量</th>
            <th>重量</th>
            <th>图片</th>
            <th>链接</th>
        </tr>
        <!--<volist name="data" id="v">
            <tr>
                <td>{$v.id}</td>
                <td>{$v.name}</td>
                <td>{$v.num}</td>
                <td>{$v.weight}</td>
            </tr>
        </volist>-->
        <foreach name="data" item="v">
            <tr>
                <td>{$v.name}</td>
                <td>{$v.name}</td>
                <td>{$v.num}</td>
                <td>{$v.weight}</td>
                <td>
                    <if condition="empty($v['img'])">
                        暂无图片
                    <else/>
                        <img src="__PUBLIC__/uploads/{$v.img}" />
                    </if>
                </td>
                <td>
                    <empty name="v.link">
                        暂无链接
                    <else/>
                        <a href="{$v.link}">链接</a>
                    </empty>
                </td>
            </tr>
        </foreach>
    </table>
</body>
</html>